home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
datasheets and manuals
/
Hardware
/
WHT
/
scsi
/
dsr_sources_2_2001
/
0powerup
< prev
next >
Wrap
Text File
|
2006-10-19
|
3KB
|
122 lines
* Temporary power up code until I get one from Brad Snyder
*
*
* All it does is clear all the memory
*
PWRUP SBO 1 Enable shadow RAM
CLR R6
AI R12,24
PWRUP1 LDCR R6,4
LI R5,>5000
PWRUP2 CLR *R5+
CLR *R5+
CLR *R5+
CLR *R5+
CI R5,>6000
JNE PWRUP2
AI R6,>100
CI R6,>0800
JNE PWRUP1
CLR R6
LDCR R6,4
* Copy in the DSR return routine
*
LI R5,DSRRT1
LI R6,DSRRT
PWRUP3 MOV *R5+,*R6+
CI R5,DSRRT2
JNE PWRUP3
* Copy in the bankit routine
*
LI R5,BNKST
LI R6,>5DD6
PWRUP4 MOV *R5+,*R6+
CI R5,BNKEND
JNE PWRUP4
* Copy in the transfer routine
*
LI R5,XFER0
LI R6,XFER
PWRUP5 MOV *R5+,*R6+
CI R5,XFER1
JNE PWRUP5
ANDI R12,>FF00
MOV R12,@BANKWS+24 Save base CRU address
MOV R12,@CRUBAS
LI R5,>0700 Set SCSI ID
MOVB R5,@IDNUM
LI R5,STINIT Initialize the stack pointer
MOV R5,@STACK
SETO R5 Invalidate the SCSI buffer
MOVB R5,@>5DBF
MOV R5,@>5DFC
* I am now doing the work of resetting the SCSI bus in this
* routine rather than calling Brad's routine in bank 7.
CLR @WMR2 No SCSI interrupts
CLR @WSER No reselection
MOV @RRPI,R1 Clear any pending interrupts
LI R1,>8000 RST bit
MOV R1,@WICR Set the RESET
LI R1,200 Leave RST on a while
PWRUP6 DEC R1
JNE PWRUP6
CLR @WICR Turn off RST
PWRUP7 TB IRQ Wait for Reset interrupt
JNE PWRUP7
MOV @RRPI,R1 Clear the interrupt
RT
* Transfer
*
* This little piece of code allows the program to
* transfer control to another bank of ROM with
* absolutely no hope for return.
*
XFER0 ANDI R12,>FF00
AI R12,16
MOV *R11,R1
LDCR R1,4 Set the ROM bank
ANDI R1,>00FF
SLA R1,1
MOV @>4000(R1),R1
B *R1
XFER1
* 5380/8490 REGISTER EQUATES ( READ )
RCSD EQU >4FE0 CURRENT SCSI DATA
RICR EQU >4FE2 INITIATOR COMMAND
RMR2 EQU >4FE4 MODE
RTCR EQU >4FE6 TARGET COMMAND
RCSB EQU >4FE8 CURRENT SCSI BUS STATUS
RBSR EQU >4FEA BUS AND STATUS
RIDR EQU >4FEC INPUT DATA REGISTER
*RRPI EQU >4FEE RESET PARITY/INTERRUPTS
RISR EQU >4FEE INTERRUPT STATUS ( 8490 ONLY )
* 5380/8490 REGISTER EQUATES ( WRITE )
WODR EQU >4FF0 OUTPUT DATA
WICR EQU >4FF2 INITIATOR COMMAND
WMR2 EQU >4FF4 TARGET COMMAND
WTCR EQU >4FF6 MODE
WSER EQU >4FF8 SELECT ENABLE
WSDS EQU >4FFA START DMA SEND
WSDT EQU >4FFC START DMA TARGET RECEIVE
WSDI EQU >4FFE START DMA INITIATOR RECEIVE
WEMR EQU >4FFE ENHANCED MODE ( 8490 ONLY )
WIMR EQU >4FFE INTERRUPT MASK ( 8490 ONLY )